home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1993 November
/
JCSM Shareware Collection - 1993-11.iso
/
cl720
/
qbnws24j.lzh
/
SCANCODE.CB
< prev
next >
Wrap
Text File
|
1991-12-07
|
504b
|
28 lines
/*
** SCANCODE.CB 1991 by Matt Hart
**
** This macro will show the ascii and scan code of a pressed key or
** key combination.
/*
void scancode()
{
int key,ascii,scan;
keyboard_flush();
message ("Press a key or key combination now");
while (! inq_kbd_char());
key = read_char();
ascii = key & 0xff;
if (ascii == 0)
{
scan = key / 0xff;
message ("Scan code is %d",scan);
}
else
{
message ("Ascii code is %d",ascii);
}
}